<?php
/* @var $this CctvcameraController */

$this->breadcrumbs=array(
	'Cctvcamera',
);
?>
<h1><?php //echo $this->id . '/' . $this->action->id; ?></h1>

<?php
		$form = $this->beginWidget('bootstrap.widgets.BsActiveForm', array(
		    'layout' => BsHtml::FORM_LAYOUT_HORIZONTAL,
		    'enableAjaxValidation' => false,
		    'id' => 'camera-form',
		    'htmlOptions' => array(
		        'class' => 'bs-example'
		    )
		));
	?>

<?php
	$cam_qry = Yii::app()->db->createCommand()
				->select('*')
				->from('cctvcamera')
				->queryAll();
	$total_cam = count($cam_qry);
	//echo $total_cam;

	$listCam = Cctvcamera::model()->findAll('isActive = TRUE');
    $listData = array();

    //var_dump($listCam);
    //echo count($listCam);
                
    for ($i = 0; $i < count($listCam); $i ++){
        $listData[$i] = $listCam[$i]->cameraname;
    }
    $model = Cctvcamera::model();
    //var_dump($listData);
    echo $form->CheckBoxListControlGroup($model, 'cameraname', $listData);
?>

<hr>

<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
								     codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
								     width="310" height="250" id="vlc" events="True">
								   <param name="Src" value="rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov" />
								   <param name="ShowDisplay" value="True" />
								   <param name="AutoLoop" value="False" />
								   <param name="AutoPlay" value="True" />
								   <embed id="vlcEmb"  type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="310" height="250"
								     target="rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov" ></embed>
								</OBJECT>

<?php $this->endWidget(); ?>